package com.seawaterbt.ssm.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seawaterbt.ssm.config.DataSource;
import com.seawaterbt.ssm.config.DataSourceEnum;
import com.seawaterbt.ssm.entity.CzDatCrewData;
import com.seawaterbt.ssm.mapper.CzDatCrewdataMapper;
import com.seawaterbt.ssm.service.CzDatCrewdataService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service

public class CzDatCrewdataServiceImpl extends ServiceImpl<CzDatCrewdataMapper, CzDatCrewData> implements CzDatCrewdataService {

    @DataSource(DataSourceEnum.DB2)
    @Override
    public List<CzDatCrewData> listAll() {
        return this.list();
    }
    @DataSource(DataSourceEnum.DB2)
    @Override
    public CzDatCrewData getByCodeTime(QueryWrapper wrapper) {
        return this.getOne(wrapper);
    }

    @DataSource(DataSourceEnum.DB2)
    @Override
    public List<CzDatCrewData> list(Wrapper<CzDatCrewData> queryWrapper) {
        return super.list(queryWrapper);
    }

    @DataSource(DataSourceEnum.DB2)
    @Override
    public boolean saveOrUpdate(CzDatCrewData entity) {
        return super.saveOrUpdate(entity);
    }
}
